<cfscript>
	// get Hibernate configuration object
	cfg = CreateObject("java", "org.hibernate.cfg.Configuration");
	config = cfg.configure();
	
	// tell config about the classes we want mapped
	// userClass = CreateObject("java", "java.lang.Class").forName("User");
	// config.addClass(userClass);
	
	// get Hibernate session factor
	sessionFactory = config.buildSessionFactory();
	
	// open a session and start the transaction
	mySession = sessionFactory.openSession();
	tx = mySession.beginTransaction();
	
	// create some data and persist it
	user = CreateObject("java", "User").init("Sticks", "Kitty", "sticks@kitty.org");
	mySession.save(user);
	
	// commit the transaction
	tx.commit();
	
	// clean up
	mySession.close();
	sessionFactory.close();
</cfscript>

<html>
<head>
	<title>Hibernate Test</title>
</head>
<body>
	<h3>Hibernate Test</h3>
</body>
</html>